home *** CD-ROM | disk | FTP | other *** search
- SPLIT
-
- written by Charlie Beerman
- July 12, 1986
-
-
- SPLIT has been written using the Lattice C compiler,
- version 2.0, on an AT&T 6300 with MS-DOS 2.11. It is hereby
- placed in the public domain, with no warranties express or
- implied.
-
- The purpose of SPLIT is to split a large file (text or
- binary) into a series of smaller files, and then to recombine
- those component files back into an exact copy of the original.
- This is useful for several purposes, among which are the storage
- of a very large file ( > 360K ) on several floppy disks, or the
- piecewise transfer of a large file over a communications line.
- The latter has been my motivation for writing this program. I
- suffer from a noisy phone line, and find that in trying to
- transfer large files I get halfway (not even) done and a glitch
- in the line trashes the transfer. I figure I can successfully
- transfer a file in several small pieces and provide a utility
- for recombining it.
-
- SPLIT is fairly easy to use. There are three main usages:
-
- 1.) Split a file into components of specified size.
- 2.) Split a file into a specified number of
- components.
- 3.) Recombine a file from its components.
-
-
- 1.) Splitting a file into components of specified size:
-
- Enter the command
-
- SPLIT S Ki File_to_split Component_prefix
-
- Where
- i is the desired size in KILOBYTES of the components.
- File_to_split is the file to be divided.
- Component_prefix is the filename (without extension)
- of the components.
-
- The program will display a summary of the file size of the
- file to be split, the specified component file size, and
- the number of files it will create. It also displays the
- name and size of each file it creates. (Note that the last
- file may be smaller than the others.) The files created
- are named by taking the specified Component prefix and
- appending the extension
-
- .-nn
-
- to the filename. The nn in the component file is
- sequentially numbered for each component file created.
- Thus, if the source file has 50K bytes and the maximum
- component filesize is 25K bytes, and the specified prefix
- is "PREFIX", then two files will be created with names
-
- PREFIX.-01 and
- PREFIX.-02
-
- At the completion of the process the total size of
- the components is displayed as a check for successful
- execution.
-
- 2.) Splitting a file into a specified number of files:
-
- Enter the command
-
- SPLIT S Ni File_to_split Component_prefix
-
- Where
- i is the number of components to create.
- all the rest of the arguments are the same as above.
-
- The component files will all be of equal size (except
- perhaps the last one), and will be named in the same way as
- above. The same summary information is displayed as
- processing occurs.
-
-
- 3.) Combining components into a single file:
-
- Enter the command
-
- SPLIT C File_to_create Component_list
-
- Where
- File_to_create is the sum of the components
- Component_list is a list of files to combine in the
- specified order. Filenames are separated by
- spaces.
-
- This will combine the files in the component list into the
- specified create file. The created file may not have the
- same name as any of the component files. The names of the
- files are displayed as they are added to the created file.
-
-
- 4.) Notes, Restrictions and Errors:
-
- A maximum of 99 component files can be created for each
- split. An error message will be issued if you ask for more
- than 99 files or ask for such a small component size that
- more than 99 files would have to be created.
-
- You may not split files into components of less than
- 4 Kilobytes. Again, the program will tell you if you try
- to do this.
-
- Arguments may be entered in upper or lower case, and should
- be separated by spaces. There should NOT be a space
- between the "K" or "N" and the number which follows it.
- The program checks for the proper number and type of
- arguments as much as it can.
-
- The filenames may include drive and/or path specifiers.
- They may NOT include wildcards (* or ?).
-
- The program will tell you if it cannot open, read from, or
- write to a file. Common causes of such errors are a
- mistyped filename, a missing file, or a write-protected or
- full disk.
-
- Any files which already exist when the program tries to
- create them will be destroyed before being created.
-
- Some of the error messages refer to component files as
- "section files".